package ${sourceBasePackage}.domain;

import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;

/**
 * ${description}实体类
 * @author ${author}
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "${tableName}")
@GenericGenerator(name = "jpa-uuid", strategy = "uuid2")
public class ${entityName} implements Serializable {

	private static final long serialVersionUID = 1L;

	<#list fields as po>
    /**
    * ${po.description}
    */
    <#if po.primaryKey == 'Y'>
    @Id
    @GeneratedValue(generator = "jpa-uuid")
	</#if>
    @Column(name = "${po.fieldName}")
    private ${po.propertyType} ${po.propertyName};
	</#list>

}
